﻿using FigureDraw.Shapes;
using FigureDraw.Shapes.ActivityShape;
using FigureDraw.Shapes.FlowchartShape;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FigureDraw.Diagram
{
    public class ActivityDiagram : BlockDiagram
    {
        private static BlockDiagram diagram;

        private ActivityDiagram() { }

        public static BlockDiagram Instance()
        {
            if (diagram == null)
                diagram = new ActivityDiagram();

            return diagram;
        }

        public override MyShape DrawBegin(MyPoint startPoint, MyPoint endPoint)
        {
            return new BeginActivity(startPoint, endPoint);
        }

        public override MyShape DrawInput(MyPoint startPoint, MyPoint endPoint)
        {
            return new InputActivity(startPoint, endPoint);
        }

        public override MyShape DrawProcess(MyPoint startPoint, MyPoint endPoint)
        {
            return new ProcessActivity(startPoint, endPoint);
        }

        public override MyShape DrawOutput(MyPoint startPoint, MyPoint endPoint)
        {
            return new OutputActivity(startPoint, endPoint);
        }

        public override MyShape DrawMove(MyPoint startPoint, MyPoint endPoint)
        {
            return new MoveActivity(startPoint, endPoint);
        }

        public override MyShape DrawCondition(MyPoint startPoint, MyPoint endPoint)
        {
            return new ConditionActivity(startPoint, endPoint);
        }

        public override MyShape DrawEnd(MyPoint startPoint, MyPoint endPoint)
        {
            return new EndActivity(startPoint, endPoint);
        }
    }
}
